package com.moxingzhegroup;

import android.os.Environment;

/**
 * @author LiaoRun
 */
public class Constants {

    public static final String PACKAGE_NAME = "com.moxingzhegroup";
    public static final String BASE_URL = "http://advertisementserver.moxingzhegroup.com";
//    public static final String BASE_URL = "http://192.168.10.69:8003";
    public volatile static String VIDEO_PATH;
    public volatile static String LOG_SAVE_DIR;
    public static int SUCCESS_CODE = 2000;
    public static String SUCCESS_MESSAGE = "操作成功";


    public static final String APP_KEY = "6204c3f7e014255fcb1aeaee";
    public static final String APP_MASTER_SECRET = "icndwaae1le5yamwm2mjwh6hjvovih1d";
    public static final String UMENG_MESSAGE_SECRET = "8b8b186a7237f96abec8d9d767099f15";

    public static int FAILED_CODE = 4000;
    public static String FAILED_MESSAGE = "操作失败";


    public static String getVideoPath() {

        if (VIDEO_PATH == null) {
            synchronized (Constants.class) {
                if (VIDEO_PATH == null) {
                    VIDEO_PATH = Environment.getExternalStorageDirectory().getAbsolutePath() + "/myVideo";

                }
            }
        }

        return VIDEO_PATH;
    }


    public static String getLogSaveDir() {

        if (LOG_SAVE_DIR == null) {
            synchronized (Constants.class) {
                if (LOG_SAVE_DIR == null) {
                    LOG_SAVE_DIR = Environment.getExternalStorageDirectory().getAbsolutePath() + "/myLog";

                }
            }
        }

        return LOG_SAVE_DIR;
    }


    /*
     数据库的版本号
     */
    public static final int DB_VERSION_CODE = 1;

    //SQL
    public static final String DB_NAME = "loop.db";

    // SQL
    // 订阅表名
    public static final String SUB_TB_NAME = "tb_subscription";
    public static final String SUB_ID = "_id";
    public static final String SUB_COVER_URL = "coverUrl";
    public static final String SUB_TITLE = "title";
    public static final String SUB_DESCRIPTION = "description";
    public static final String SUB_TRACK_COUNT = "tracksCount";
    public static final String SUB_PLAY_COUNT = "playCount";
    public static final String SUB_AUTHOR_NAME = "authorName";
    public static final String SUB_ALBUM_ID = "albumId";

    // 历史表
    public static final String HISTORY_TB_NAME = "tb_history";
    public static final String HISTORY_COVER_URL = "coverUrl";
    public static final String HISTORY_ID = "_id";
    public static final String HISTORY_TRACK_ID = "trackId";
    public static final String HISTORY_TITLE = "title";
    public static final String HISTORY_PLAY_COUNT = "playCount";
    public static final String HISTORY_DURATION = "history_duration";
    public static final String HISTORY_UPDATE_TIME = "history_update_time";
    public static final String TRACK_AUTHOR_NAME = "authorName";


    // 收藏音乐的表
    public static final String LOVE_SONG_TB_NAME = "tb_love_song";
    public static final String LOVE_SONG_COVER_URL = "coverUrl";
    public static final String LOVE_SONG_ID = "_id";
    public static final String LOVE_SONG_TRACK_ID = "trackId";
    public static final String LOVE_SONG_TITLE = "title";
    public static final String LOVE_SONG_PLAY_COUNT = "playCount";
    public static final String LOVE_SONG_DURATION = "history_duration";
    public static final String LOVE_SONG_UPDATE_TIME = "history_update_time";
}
